#ifndef _ACTION_PROPERTY_H_
#define _ACTION_PROPERTY_H_

//(*Headers(ActionProperty)
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/statline.h>
#include <wx/radiobut.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/treectrl.h>
//*)
#include <boost/function.hpp>
#include "utility.h"

class ImageLayer;
typedef boost::function<void (SActionInfo &)> OnSetPropertyFun;

class ActionProperty: public wxPanel
{
public:

	ActionProperty(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
	virtual ~ActionProperty();
	void SetActionInfo(SActionInfo &action);
	void SetSetPropertyFun(OnSetPropertyFun fun)
	{
		m_onSetFun = fun;
	}
	void AddLayer(SLayer *pLayer);
	void DelLayer(SLayer *pLayer);
	void DelAllLayer();
protected:
	//(*Declarations(ActionProperty)
	wxTextCtrl* m_pPicText;
	wxRadioButton* m_pComplexAction;
	wxRadioButton* m_pSimpleAction;
	wxTextCtrl* m_pFrameNum;
	wxTextCtrl* m_pComFrameNum;
	wxStaticLine* m_pStaticLine;
	wxTextCtrl* m_pFrameSpace;
	ImageLayer* m_pImageLayer;
	//*)
	//(*Identifiers(ActionProperty)
	static const long ID_RADIOBUTTON1;
	static const long ID_BUTTON1;
	static const long ID_TEXTCTRL1;
	static const long ID_STATICTEXT1;
	static const long ID_TEXTCTRL2;
	static const long ID_STATICTEXT2;
	static const long ID_TEXTCTRL3;
	static const long ID_BUTTON2;
	static const long ID_STATICLINE1;
	static const long ID_RADIOBUTTON2;
	static const long ID_CUSTOM1;
	static const long ID_STATICTEXT3;
	static const long ID_TEXTCTRL4;
	static const long ID_TREECTRL1;
	static const long ID_BUTTON3;
	//*)

private:

	//(*Handlers(ActionProperty)
	//*)
	OnSetPropertyFun m_onSetFun;
	void OnSelImage(wxCommandEvent &event);
	void OnSetSimple(wxCommandEvent &event);
	void OnSetComplex(wxCommandEvent &event);
};

#endif
